﻿@model HanGu.Entity.PhilosopherBema
@{
    Layout = null;
    TempData["TitlePic"] = Model.TitlePic;//.Replace("_B.", "_S.");
    TempData["ContorlID"] = "Remark";
    TempData["Remark"] = Model.Remark;
    TempData["GropName"] = Model.GUID;
    SelectList lectchers = ViewData["Lectchers"] as SelectList;
    SelectList memberGrade = ViewData["MemberGrade"] as SelectList;
    TempData["PhotoTip"] = "请上传图片:340*130";
}
<div class="pageContent">
    <form method="post" action="admin/@ViewData["CurrentController"]/create" enctype="MULTIPART/FORM-DATA" class="pageForm required-validate"
    onsubmit="return iframeCallback(this, navTabAjaxDone);">
    @Html.ValidationSummary(true)
    <div class="pageFormContent" layouth="56">
        @Html.HiddenFor(model => model.ID)
        @Html.HiddenFor(model => model.GUID)
        @Html.Hidden("oldPlayURL", Model.PlayURL)
        @Html.HiddenFor(model => model.ClassType)
        @Html.Hidden("Lecturer.id", Model.LecturerID)
        <div class="CreateDiv">
            <div class="LeftDiv">
                <label>
                    标题图片：</label>
                @Html.HiddenFor(c => c.TitlePic)
                @Html.Partial("uploadify")
            </div>
            <div class="rightDiv">
                <p>
                    <label>
                        标题：</label>
                    @Html.TextBoxFor(model => model.Title, new { @class = "required", @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.Title)
                </p>
                <p>
                    <label>
                        跳转地址：</label>
                    @Html.TextBoxFor(model => model.RedirectUrl, new { @class = "required", @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.RedirectUrl)
                </p>
               @* <p>
                    <label>
                        播放地址：</label>
                    @Html.TextBoxFor(model => model.PlayURL, new { @class = "required", @style = "width:200px" })
                    @Html.ValidationMessageFor(model => model.PlayURL)
                    <div id="fileQueue" class="fileQueue" style="height: 40px;">
                    </div>
                    <input id="FileInput" type="file" name="image" uploader="/Content/uploadify/scripts/uploadify.swf"
            cancelimg="Content/uploadify/cancel.png" script="admin/FileManage/SaveFile" scriptdata="{ClassType:'Temp', guid:'@Model.GUID',GroupName:'@Model.GUID'}"
            filequeue="fileQueue" onallcomplete="uploadifyComplete" fileExt="*.*" fileDesc="*.*"/>
                    <script>
                        function uploadifyComplete(event, queueId, fileObj, response, data) {
                            debugger;
                            var json = eval("(" + response + ")");
                            $("#PlayURL").val(json.msg);
                        }
                    </script>
                </p>*@
                <p>
                    <label>
                        讲师：</label>
                    @Html.TextBox("Lecturer.Name", Model.Lecturer, new { @class = "required", @Readonly = "true" })
                    <a class="btnLook" href="admin/LecturerInfo/Selector?lookup=Lecturer" lookupgroup="Lecturer">选择讲师</a>
                </p>
                <p>
                    <label>
                        播放地点：</label>
                    @Html.TextBoxFor(model => model.PlayAddress, new { @class = "required" })
                    @Html.ValidationMessageFor(model => model.PlayAddress)
                </p>
                <p>
                    <label>
                        播放时间：</label>
                    @Html.TextBox("PlayTime", HanGu.Common.Helper.FormatDate(Model.PlayTime), new { @class = "required date", format = "yyyy-MM-dd HH:mm", @readonly = "true" })
                    @Html.ValidationMessageFor(model => model.PlayTime)
                </p>
                @*<p>
                    <label>
                        观看级别：</label>
                    @Html.DropDownListFor(model => model.LimiteGrade, memberGrade, new { @class = "required combox" })
                    @Html.ValidationMessageFor(model => model.LimiteGrade)
                </p>*@
                @*<p>
                    <label>
                        正在进行:</label>
                    <input type="checkbox" id="IsIndex" name="IsIndex"  checked="@Model.IsIndex"/>
                    @Html.ValidationMessageFor(model => model.IsIndex)
                </p>
                <p>
                    <label>
                        精彩回顾:</label>
                    <input type="checkbox" id="IsTop" name="IsTop"  checked="@Model.IsTop"/>
                    @Html.ValidationMessageFor(model => model.IsTop)
                </p>*@
                <p>
                    <label>
                        点击数：</label>
                    @Html.TextBoxFor(model => model.Clicks, new { @class = "number" })
                    @Html.ValidationMessageFor(model => model.Clicks)
                </p>
                <p>
                    <label>
                        创建时间：</label>
                    @Html.TextBoxFor(model => model.CreateTime, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.CreateTime)
                </p>
                <p>
                    <label>
                        创建者：</label>
                    @Html.TextBoxFor(model => model.Creator, new { @Readonly = "true" })
                    @Html.ValidationMessageFor(model => model.Creator)
                </p>
                <p>
                    <label>
                        修改时间：</label>
                    @Html.TextBoxFor(model => model.UpdateTime, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.UpdateTime)
                </p>
                <p>
                    <label>
                        修改者：</label>
                    @Html.TextBoxFor(model => model.Updater, new { @Readonly = "Readonly" })
                    @Html.ValidationMessageFor(model => model.Updater)
                </p>
            </div>
        </div>
        <p style="width: 100%; height: 80px;">
            <label>
                摘要:</label>
            @Html.TextAreaFor(model => model.Summary, new { style = "width:99%; height:80px;" })
        </p>
        @*        <div class="divider"/>        
*@ @*        <p style="width: 100%">
            <label style="width: 400px; margin-bottom: 10px;">
                <div style="width: 100px; float: left;">
                    内容：</div>
                <div style="width: 200px; float: left;">
                    @if (Model.ID > 0)
                    { 
                        <a class="button" target="ajaxTodo" href="admin/filemanage/DeleteByGroupName/@Model.GUID"  title="若修改【内容】，可先清空服务器的相关文件，确定清空吗？">
                            <span>清空服务器资源</span></a>
                    }
                </div>
            </label>
            @Html.Partial("Editor", new HanGu.Entity.EditorDTO() { CrontrollID = "Remark", Value = Model.Remark })
            @Html.ValidationMessageFor(model => model.Remark)
        </p>*@
    </div>
    <div class="formBar">
        <ul>
            <li>
                <div class="buttonActive">
                    <div class="buttonContent">
                        <button type="submit">
                            提交</button></div>
                </div>
            </li>
            <li>
                <div class="button">
                    <div class="buttonContent">
                        <button type="button" class="close">
                            取消</button></div>
                </div>
            </li>
        </ul>
    </div>
    </form>
</div>
